package com.tyk.bookstore.front.order.vo;

import com.tyk.bookstore.front.common.core.model.enume.PaymentWay;
import com.tyk.bookstore.front.order.model.emume.OrderState;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author tyk
 * @description OrderSplitVo
 */
@Data
public class OrderSplitVo {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "订单编号")
    private String orderNo;

    @Schema(description = "订单金额")
    private BigDecimal amount;

    @Schema(description = "下单时间")
    private LocalDateTime createTime;

    @Schema(description = "支付方式")
    private PaymentWay paymentWay;

    @Schema(description = "支付时间")
    private LocalDateTime paymentTime;

    @Schema(description = "收件人姓名")
    private String cneeName;

    @Schema(description = "收件人区域")
    private Long cneeAreaCode;

    @Schema(description = "收件人区域")
    private String cneeAreaFullName;

    @Schema(description = "收件人地址")
    private String cneeAddress;

    @Schema(description = "收件人电话")
    private String cneePhone;

    @Schema(description = "子订单列表")
    List<Order> children;

    @Data
    public static class Order {
        @Schema(description = "订单ID")
        private Long id;
        @Schema(description = "订单编号")
        private String orderNo;
        @Schema(description = "订单金额")
        private BigDecimal amount;
        @Schema(description = "订单状态")
        private OrderState state;
    }
}
